\(\int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx\) [283]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 24 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\tan (c+d x)}{d \sqrt {a \sec ^2(c+d x)}} \]

[Out]

tan(d*x+c)/d/(a*sec(d*x+c)^2)^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3738, 4207, 197} \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\tan (c+d x)}{d \sqrt {a \sec ^2(c+d x)}} \]

[In]

Int[1/Sqrt[a + a*Tan[c + d*x]^2],x]

[Out]

Tan[c + d*x]/(d*Sqrt[a*Sec[c + d*x]^2])

Rule 197

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^(p + 1)/a), x] /; FreeQ[{a, b, n, p}, x] &
& EqQ[1/n + p + 1, 0]

Rule 3738

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = \int \frac {1}{\sqrt {a \sec ^2(c+d x)}} \, dx \\ & = \frac {a \text {Subst}\left (\int \frac {1}{\left (a+a x^2\right )^{3/2}} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\tan (c+d x)}{d \sqrt {a \sec ^2(c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\tan (c+d x)}{d \sqrt {a \sec ^2(c+d x)}} \]

[In]

Integrate[1/Sqrt[a + a*Tan[c + d*x]^2],x]

[Out]

Tan[c + d*x]/(d*Sqrt[a*Sec[c + d*x]^2])

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\tan \left (d x +c \right )}{d \sqrt {a +a \tan \left (d x +c \right )^{2}}}\) \(25\)
default \(\frac {\tan \left (d x +c \right )}{d \sqrt {a +a \tan \left (d x +c \right )^{2}}}\) \(25\)
risch \(-\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{2 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}}+\frac {i}{2 \sqrt {\frac {a \,{\mathrm e}^{2 i \left (d x +c \right )}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) d}\) \(101\)

[In]

int(1/(a+a*tan(d*x+c)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/d*tan(d*x+c)/(a+a*tan(d*x+c)^2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.58 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\sqrt {a \tan \left (d x + c\right )^{2} + a} \tan \left (d x + c\right )}{a d \tan \left (d x + c\right )^{2} + a d} \]

[In]

integrate(1/(a+a*tan(d*x+c)^2)^(1/2),x, algorithm="fricas")

[Out]

sqrt(a*tan(d*x + c)^2 + a)*tan(d*x + c)/(a*d*tan(d*x + c)^2 + a*d)

Sympy [F]

\[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\int \frac {1}{\sqrt {a \tan ^{2}{\left (c + d x \right )} + a}}\, dx \]

[In]

integrate(1/(a+a*tan(d*x+c)**2)**(1/2),x)

[Out]

Integral(1/sqrt(a*tan(c + d*x)**2 + a), x)

Maxima [A] (verification not implemented)

none

Time = 0.40 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.54 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\sin \left (d x + c\right )}{\sqrt {a} d} \]

[In]

integrate(1/(a+a*tan(d*x+c)^2)^(1/2),x, algorithm="maxima")

[Out]

sin(d*x + c)/(sqrt(a)*d)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 47 vs. \(2 (22) = 44\).

Time = 0.51 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.96 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=-\frac {2}{\sqrt {a} d {\left (\frac {1}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1\right )} \]

[In]

integrate(1/(a+a*tan(d*x+c)^2)^(1/2),x, algorithm="giac")

[Out]

-2/(sqrt(a)*d*(1/tan(1/2*d*x + 1/2*c) + tan(1/2*d*x + 1/2*c))*sgn(tan(1/2*d*x + 1/2*c)^4 - 1))

Mupad [B] (verification not implemented)

Time = 10.97 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.29 \[ \int \frac {1}{\sqrt {a+a \tan ^2(c+d x)}} \, dx=\frac {\sin \left (2\,c+2\,d\,x\right )\,\sqrt {\frac {a\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )}{4\,\cos \left (2\,c+2\,d\,x\right )+\cos \left (4\,c+4\,d\,x\right )+3}}}{a\,d} \]

[In]

int(1/(a + a*tan(c + d*x)^2)^(1/2),x)

[Out]

(sin(2*c + 2*d*x)*((a*(cos(2*c + 2*d*x) + 1))/(4*cos(2*c + 2*d*x) + cos(4*c + 4*d*x) + 3))^(1/2))/(a*d)